<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>小疯子博客系统</title>
    <link rel="stylesheet" href="/md/css/style.css" />
    <link rel="stylesheet" href="/md/css/editormd.preview.css" />
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
          integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</head>
<body>
<#if article??>
<textarea id="content" hidden>${article.content}</textarea>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-xs-1"></div>
        <div class="col-sm-6 col-xs-10">
            <div class="row">
                <h1>${ article.titleName }</h1>
            </div>
            <div class="row">
                <#list labels as label>
                    <a class="btn btn-info btn-xs">${label}</a>
                </#list>
                <a class="btn btn-success btn-xs">
                    ${ user.nickName }
                </a>
                <small>发表于 ${article.createTime}</small>
            </div>

            <div class="row">
                <hr/>
            </div>
            <div class="row" id="test-editormd-view">
                <#--<div class="row">
                    <div class="col-sm-12 col-xs-12">
                        <img style="width: 100%; height: 100%;" src="">
                    </div>
                </div>-->

            </div>
        </div>
        <div class="col-sm-3 col-xs-1"></div>
    </div>
</div>
<#else>
    <h1>文章不见了O(∩_∩)O</h1>
</#if>
</body>
<!-- jQuery -->
<script src="/adminlte/plugins/jquery/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
        integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<script src="/md/marked.min.js"></script>
<script src="/md/prettify.min.js"></script>

<script src="/md/raphael.min.js"></script>
<script src="/md/underscore.min.js"></script>
<script src="/md/sequence-diagram.min.js"></script>
<script src="/md/flowchart.min.js"></script>
<script src="/md/jquery.flowchart.min.js"></script>

<script src="/md/editormd.min.js"></script>
<script>
    editormd.markdownToHTML("test-editormd-view", {
        markdown        : $("#content").text() ,//+ "\r\n" + $("#append-test").text(),
        //htmlDecode      : true,       // 开启 HTML 标签解析，为了安全性，默认不开启
        htmlDecode      : "style,script,iframe",  // you can filter tags decode
        //toc             : false,
        tocm            : true,    // Using [TOCM]
        //tocContainer    : "#custom-toc-container", // 自定义 ToC 容器层
        //gfm             : false,
        //tocDropdown     : true,
        // markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签
        emoji           : true,
        taskList        : true,
        tex             : true,  // 默认不解析
        flowChart       : true,  // 默认不解析
        sequenceDiagram : true,  // 默认不解析
    });
</script>
</html>
